package com.bella.sringcloud.controller;/**
 * @program: cloud2022
 * @description:
 * @packagename: com.bella.sringcloud
 * @author: Bella白
 * @date: 2022-09-03 22:13
 **/

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: bella白
 * @Title: ConfigClientController
 * @ProjectName: cloud2022
 * @Description:
 * @date: 2022/9/3 22:13
 */
@RestController
@RefreshScope
public class ConfigClientController {
    @Value("${server.port}")
    private String serverPort;

    @Value("${config.info}")
    private String configInfo;


    @GetMapping("/configInfo")
    public String getConfigInfo() {
        return "serverPort:" + serverPort + "\t\n\n configInfo: " + configInfo;
    }
}
